function dating_so_btnFn(){ZeaiM.div_left({obj:dating_so,w:28});}


function addInit(){
	zeai.listEach(zeai.tag(www_zeai_cn_FORM,'input'),function(obj){
		if(obj.type!='hidden'){
			obj.onblur=blurFn;
		}
	});
	zeai.listEach(zeai.tag(www_zeai_cn_FORM,'select'),function(obj){
		obj.onblur=blurFn;
	});
	function blurFn(){zeai.setScrollTop(0);}
	content.onblur=blurFn;
}

function dating_btn_saveFn(){
	content.value = content.value.substring(0,140);
	zeai.ajax({url:HOST+'/m/dating.php',js:1,form:www_zeai_cn_FORM},function(e){var rs=zeai.jsoneval(e);
		zeai.msg(0);zeai.msg(rs.msg);
		if(rs.flag==1){
			if(!zeai.empty(rs.url)){
				setTimeout(function(){zeai.openurl(rs.url);},1000);
			}else{
				setTimeout(function(){location.reload(true);},1000);
			}
		}
	});
}
function dating_btn_detailBMfn() {
	ZeaiM.confirmUp({title:'确定要报名此约会么？',cancel:'取消',ok:'确定报名',okfn:function(){
		zeai.msg('正在报名中..',{time:5});
		zeai.ajax({url:HOST+'/m/dating.php',form:www_zeai_cn_FORM},function(e){var rs=zeai.jsoneval(e);
			zeai.msg(0);zeai.msg(rs.msg);
			if(rs.flag=='nologin'){
				setTimeout(function(){zeai.openurl(HOST+'/m/login'+zeai.ajxext+'jumpurl='+encodeURIComponent(rs.jumpurl));},1000);
			}else if(rs.flag==1){
				setTimeout(function(){location.reload(true);},1000);
			}
		});
	}});
}
function dating_delmy(id) {
	ZeaiM.confirmUp({title:'请慎重，确定要删除此约会么？',cancel:'取消',ok:'确定',okfn:function(){
		zeai.ajax({url:HOST+'/m/dating.php?submitok=ajax_detail_del&clsid='+id},function(e){var rs=zeai.jsoneval(e);
			zeai.msg(0);zeai.msg(rs.msg);
			if(rs.flag==1){
				setTimeout(function(){location.reload(true);},1000);
			}
		});
	}});
}
function dating_manage(id,title) {
	zeai.openurl(HOST+'/m/dating'+zeai.ajxext+'submitok=ajax_dating_bmuser&clsid='+id+'&title='+title);
}
function dating_listBmBoxuInit(list) {
	zeai.listEach(zeai.tag(list,'li'),function(li){
		var U=li.children[0],clsid,uA,nickname,fid;
		li.children[0].onclick = function (){
			zeai.openurl(HOST+'/m/u'+zeai.ajxext+'uid='+this.getAttribute("uid"));
		}
		uA=li.lastChild;
		if(uA.tagName=='A'){
			uA.onclick = function (){
				nickname=this.getAttribute("nickname");
				clsid   =this.parentNode.getAttribute("clsid");
				fid   =this.parentNode.getAttribute("fid");
				zeai.alertplus({title:'★确定邀请此人★',content:'<div style="text-align:left">① 操作后本约会将自动变为结束报名<br><br>② 【'+nickname+'】将看到你在约会中的联系方法<br><br>③ 请速与【'+nickname+'】联系进行线下约会<br><br>祝你们约会成功，交友愉快！</div>	',title1:'取消',title2:'确认',
					fn1:function(){zeai.alertplus(0);},
					fn2:function(){
						zeai.alertplus(0);
						zeai.msg('邀请并正在通知对方..',{timd:5});
						zeai.ajax({url:HOST+'/m/dating'+zeai.ajxext+'submitok=ajax_dating_bmuser_update&clsid='+clsid+'&fid='+fid},function(e){rs=zeai.jsoneval(e);
							zeai.msg(0);zeai.msg(rs.msg);
							if(rs.flag==1){
								setTimeout(function(){location.reload(true);},1000);
							}
						});
					}
				});
			}
		}
	});
}